unit untPrincipal;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
   nome: string;
   email: string;

begin
    nome:= edit1.Text;
    email:= edit2.Text;

    if  (nome='')then
    begin
       showmessage('Por favor, preecher o campo Nome!');
       edit1.SetFocus;
       exit;
    end;

    if  (email='')then
    begin
       showmessage('Por favor, preecher o campo E-mail!');
       edit2.SetFocus;
       exit;
    end;
    showmessage('OK, todos os campos preenchidos!');
end;

end.
